/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.ufrn.dimap.contagem;

/**
 *
 * @author augusto
 */
public abstract class AbstractUsuarioPost implements Comparable {
    
    protected int contPosts, contComments;
    protected String nome;
    
    public AbstractUsuarioPost(String nome)
    {
        this.nome = nome;
    }
       
    public int getContPosts()
    {
        return contPosts;
    }
    
    public int getContComments()
    {
        return contComments;
    }
    
    public void addContPosts()
    {
        contPosts++;    
    }
    
    public void addContComments()
    {
        contPosts++;    
    }
    
    public String  getNome()
    {
        return nome;
    }

    public abstract int getPontos();
    
    @Override
    public int compareTo(Object o) {
        return ((br.ufrn.dimap.contagem.AbstractUsuarioPost)o).getPontos() - getPontos();
    }
    
    @Override
    public boolean equals(Object o){
        return this.getNome().equals(((br.ufrn.dimap.contagem.AbstractUsuarioPost)o).getNome());
    }
}